The disclosure of the following priority application is herein incorporated by reference:
Japanese Patent Application No. 10-136560 filed May 19, 1998.
1. Field of the Invention
The present invention relates to an interpolation processing apparatus that performs interpolation processing in which the interpolation quantity corresponding to the value of a missing color component in each pixel is determined for a color image expressed through a colorimetric system comprising a predetermined plurality of color components and a recording medium having an interpolation processing program which enables a computer to execute such interpolation processing recorded therein.
2. Description of the Related Art
A color image is generated by capturing an image of a subject image that has been transmitted through a CFA (color filter array) constituted of color filters in a plurality of colors (e.g., RGB: red, green, blue) in an electronic still camera in the prior art.
The color filter array may have a structure achieved by arranging color filters in three colors, i.e., R, G and B, in the Bayer array, as illustrated in FIG. 7. In an image-capturing element that captures an image of a subject which has been transmitted through a color filter array structured as described above, color information representing a single color is generated at each pixel.
Namely, even if the color image is expressed through a colorimetric system constituted of three color components, only one color component is obtained at each pixel.
Thus, in order to obtain all the color components at the individual pixels, digital still cameras and image processing apparatuses that perform image processing on color images may have a function of performing interpolation processing (processing through which the interpolation quantities corresponding to the values of missing color components are determined) on a digitized color image.
While pixels having the same color component manifest a high degree of spatial similarity in a normal color image, pixels having different color components in the same color image have only a low degree of spatial similarity (similarity among different color components). Consequently, in order to determine an interpolation quantity for a pixel that is to undergo interpolation processing, under normal circumstances a method is employed in which the value representing a color component of a pixel that is located near the pixel to undergo interpolation processing and has a color component that is missing from the pixel to undergo interpolation processing is used.
For instance, when performing interpolation processing for the green color component on a xe2x80x9cpixel having a red or blue color componentxe2x80x9d, the average value of color component values corresponding to xe2x80x9ca plurality of pixels (four pixels in FIG. 7) having a green color componentxe2x80x9d adjacent to the xe2x80x9cpixel having a red or blue color componentxe2x80x9d is used as the interpolation quantity.
Now, let us consider a case in which such interpolation processing is performed on a color image with longitudinal gray stripes, as illustrated in FIG. 8.
First, it is assumed that the color component values corresponding to the individual pixels achieved when the image illustrated in FIG. 8 is projected on the color filters shown in FIG. 7 are as indicated in FIG. 9. In addition, in FIG. 9, G(0,0), G(0,2), . . . , G(7,7) are values of the green color component, R(0,1), R(0,3), . . . , R(6,7) are values of the red color component, B(1,0), B(1,2), . . . B(7,6) are values of the blue color component.
For instance, the green interpolation quantity G(4,3) for the pixel (4,3) having the red color component is calculated to be:       G    ⁢          (              4        ,        3            )        =                    [                              G            ⁢                          (                              3                ,                3                            )                                +                      G            ⁢                          (                              4                ,                2                            )                                +                      G            ⁢                          (                              4                ,                4                            )                                +                      G            ⁢                          (                              5                ,                3                            )                                      ]            /      4        ⁢          
        ⁢          xe2x80x83        =                            (                      34            +            38            +            255            +            23                    )                /        4            ⁢              
            ⁢              xe2x80x83            ≈      87      
Now, in the case of the color image illustrated in FIG. 8, which demonstrates a high degree of similarity in the longitudinal direction, G(4,3) needs to maintain continuity with G(3,3) and G(5,3). However, if G(4,3) is set to G(4,3)≈87 as described above, the continuity between G(4,3) and G(3,3) and between G(4,3) and G(5,3) becomes broken.
In other words, if the interpolation processing described above is performed on a gray image, correct interpolation quantities cannot be calculated, resulting in a problem that false colors that are not present in the original image are generated. In addition, this problem occurs not only when the interpolation processing discussed above is performed on gray images but also when the interpolation processing is performed on single-hue images (e.g., sepia-tone images).
It is to be noted that this problem is likely attributable to the interpolation processing, which is performed on the assumption that all color images have the characteristics described above, i.e., characteristics such that pixels having the same color component manifest a high degree of spatial similarity and pixels having different color components manifest a low degree of spatial similarity.
Now, a xe2x80x9cphotographing mode selector switchxe2x80x9d that switches between a gray image photographing mode and a normal color image photographing mode, for instance, may be provided at the casing of the electronic still camera to achieve interpolation processing that supports different characteristics of color images. However, when this method is adopted, the operator is required to select the gray image photographing mode by operating the xe2x80x9cphotographing mode selector switchxe2x80x9d to photograph text and monochrome test charts.
An object of the present invention is to provide an interpolation processing apparatus that is capable of obtaining characteristics of a given color image and performing interpolation processing corresponding to the characteristics with a high degree of reliability and to provide a recording medium having an interpolation processing program that is capable of obtaining characteristics of a given color image and performing interpolation processing corresponding to the characteristics with a high degree of reliability, recorded therein.
In order to attain the above object, an interpolation processing apparatus according to the present invention comprises: an interpolation processing unit that performs interpolation processing on a color image expressed through a colorimetric system constituted of a predetermined plurality of color components to determine an interpolation quantity corresponding to a value representing a missing color component in each pixel; and a color composition identification unit that identifies a color component composition of the color image. And the interpolation processing unit is capable of performing a plurality of types of interpolation processing in correspondence to color component compositions of the color image, selects a type of interpolation processing corresponding to the color component composition identified by the color composition identification unit and performs the type of interpolation processing that has been selected on the color image.
A recording medium according to the present invention records an interpolation processing program to be executed by a computer. The interpolation program comprises: a procedure in which a color component composition of a color image expressed through a colorimetric system constituted of a predetermined plurality of color components are identified; a procedure in which one type of interpolation processing that corresponds to the color component composition that has been identified is selected from a plurality of types of interpolation processing corresponding to color component compositions of the color image; and a procedure in which the interpolation processing that has been selected is executed and an interpolation quantity corresponding to a value of a color component missing in each pixel is determined for the color image.
An electronic camera according to the present invention comprises: an image-capturing device that has a plurality of pixels and generates an image by capturing an image of a subject; color filters that are provided in correspondence to a plurality of pixels of the image-capturing device and are constituted by adopting a colorimetric system constituted of a plurality of color components; an interpolation processing device that performs interpolation processing on a color image generated by the color filters and the image-capturing device to determine an interpolation quantity corresponding to a value of a missing color component in each pixel; and a color composition identification device that identifies a color component composition of the color image. And the interpolation processing device is capable of performing a plurality of types of interpolation processing in correspondence to color component compositions of the color image, selects a type of interpolation processing that corresponds to the color component composition identified by the color composition identification device and performs the type of interpolation processing that has been selected on the color image.
In the above interpolation processing apparatus and electronic camera, preferably, when the interpolation processing unit or device decides that the color image is either one of a single-hue image and a gray image based upon the color component composition identified by the color composition identification unit or device, the interpolation processing unit or device selects an interpolation processing that uses a value corresponding a value of a color component of a pixel to undergo interpolation processing as an interpolation quantity for another color component in the pixel.